package com.yupi.lkzyoj.judge.codeSandBox.impl;

import com.yupi.lkzyoj.judge.codeSandBox.ICodeSandBox;
import com.yupi.lkzyoj.judge.codeSandBox.model.ExecuteCodeRequest;
import com.yupi.lkzyoj.judge.codeSandBox.model.ExecuteCodeResponse;
import com.yupi.lkzyoj.model.dto.questionsubmit.JudgeInfo;

import java.util.Arrays;

/**
 * 远程代码箱沙箱
 * 最终的业务沙箱
 *
 * @author Wei
 * @date 2024/05/28
 */
public class RemoteCodeBoxSandBoxImpl implements ICodeSandBox {
    @Override
    public ExecuteCodeResponse executeCode(ExecuteCodeRequest executeCodeRequest) {
        System.out.println("远程代码沙箱执行----");
        return ExecuteCodeResponse.builder()
                .message("运行成功")
                .judgeInfo(new JudgeInfo("运行成功!", 2048L, 7777L))
                .outputList(Arrays.asList("8", "16", "26 32"))
                .status(200)
                .build();
    }
}
